{
  "properties" : { },
  "id" : "db4e3f8c3c3e44329f42468d877b28c5",
  "script" : null,
  "groupId" : "e7c57e1086a64d09a8c9d615ca57f6fd",
  "name" : "获取全部配置文件列表",
  "createTime" : 1727071199158,
  "updateTime" : 1726651009714,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "getFileList",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\n    \"deviceId\":\"D1153460434222107287\"\n}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": {\n        \"total\": 1,\n        \"current\": 1,\n        \"size\": 30,\n        \"records\": [\n            {\n                \"id\": \"1801438832302784514\",\n                \"filename\": \"startup.cfg\",\n                \"updatetime\": \"2024-06-14 10:17:41\",\n                \"md5digest\": \"ef6725660478e86cccd0e38b46bb0f41\",\n                \"rowId\": \"1\"\n            }\n        ]\n    }\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }
}
================================
import org.json.JSONArray;

sql = """
    select id, filename, update_time updateTime, md5_digest md5_digest 
    from ndmp_net_device_cfg_file 
    where device_id = #{body.deviceId}
    and  flag = '0' order by update_time desc
"""
page = db.page(sql)
if (page.records == null){
    page.records = new JSONArray()
}
return page